package u1project.common;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @author oldliu
 * @since 1.0
 */
public class Request implements Serializable {
    private String action;
    private Map<String,Object> params=new HashMap<>();
    public Request() {
    }
    public Request(String action) {
        this.action = action;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public void put(String key, Object v){
        this.params.put(key,v);
    }
    public Object get(String key){
       return this.params.get(key);
    }
    public void remove(String key){
        this.params.remove(key);
    }

    @Override
    public String toString() {
        return "action:"+this.action+".params："+this.params;
    }
}
